package com.example.demo1.objects;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.stereotype.Component;

@Component // 此注解对于URL 输入参数映射无效
public class QueryParams0 {
    private String a;
    private String b;

    public String getB() {
        return b;
    }
    public String getA() {
        return a;
    }

    // 必须需要setter 函数，才能使得URL 输入参数映射成功
    public void setA(String a) {
        this.a = a;
    }
    public void setB(String b) {
        this.b = b;
    }

    public String toString()
    {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("a", getA())
                .append("b", getB())
                .toString();
    }
}
